<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMembersTable extends Migration
{
  /**
   * 会员信息
   * Run the migrations.
   *
   * @return void
   */
  public function up()
  {
    Schema::create('member', function (Blueprint $table) {
      $table->increments('id');
      $table->string('oddNumber', 100)->comment('会员编号');
      $table->string('username', 30)->comment('会员姓名');
      $table->boolean('sex')->default(true)->comment('会员性别 1男 0女');
      $table->string('famousRace', 30)->nullable()->comment('民族');
      $table->string('tel', 30)->comment('移动电话');
      $table->string('card', 20)->nullable()->comment('证件号码');
      $table->string('birthday', 30)->nullable()->comment('生日');
      $table->string('openBank', 255)->comment('开户行');
      $table->string('accountNumber', 50)->comment('账号');
      $table->string('identifyNumber', 50)->comment('纳税人识别号');
      $table->unsignedSmallInteger('vehicle_id')->comment('车辆信息ID');
      $table->text('msg')->nullable()->comment('备注信息');
      $table->timestamps();
    });
  }

  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
    Schema::dropIfExists('member');
  }
}
